Skip to content

Conversation

@BrandtKruger
Copy link
Contributor

@BrandtKruger BrandtKruger commented Nov 26, 2025

fix: make isort conditional to maintain Python 3.9 compatibility

  • Add conditional isort installation in [project.optional-dependencies]
    • Python 3.10+: isort >=7.0.0
    • Python 3.9: isort >=5.12.0, <7.0
  • Remove hardcoded isort from [tool.poetry.dev-dependencies]
  • Update requirements.txt with documentation comment
  • Maintains backwards compatibility with Python 3.9 while allowing
    Python 3.10+ users to use isort v7

Fixes Python 3.9 CI/CD compatibility issue with isort v7 upgrade.
This PR builds on top of PR #126 (isort v7 upgrade).

Checklist

🛟 If you need help, consider asking for advice over in the Kinde community.

renovate bot and others added 2 commits October 11, 2025 13:35
- Add conditional isort installation in [project.optional-dependencies]
  - Python 3.10+: isort >=7.0.0
  - Python 3.9: isort >=5.12.0, <7.0
- Remove hardcoded isort from [tool.poetry.dev-dependencies]
- Update requirements.txt with documentation comment
- Maintains backwards compatibility with Python 3.9 while allowing
  Python 3.10+ users to use isort v7

Fixes Python 3.9 CI/CD compatibility issue with isort v7 upgrade.
This PR builds on top of PR kinde-oss#126 (isort v7 upgrade) and adds
Python 3.9 compatibility.
@BrandtKruger BrandtKruger requested a review from a team as a code owner November 26, 2025 17:23
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 26, 2025

Walkthrough

Replaced the single isort>=5.12.0 entry in requirements.txt with Python-version-conditional constraints: isort>=7.0.0 for python_version >= '3.10' and isort>=5.12.0,<7.0 for older Pythons. Added explanatory comments and a dev-install hint. (Lines changed: +5 / -1)

Changes

Cohort / File(s) Summary
Requirements & comments
requirements.txt
Removed the single isort>=5.12.0 line and added conditional constraints: isort>=7.0.0 for python_version >= '3.10' and isort>=5.12.0,<7.0 for python_version < '3.10'. Added comments documenting the conditional versioning, a development editable-install hint, and a note about Python 3.9 CI/CD compatibility.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly refers to the main change: making isort compatible with Python 3.9 through conditional versioning constraints.
Description check ✅ Passed The description comprehensively explains the changeset, detailing the conditional isort installation, affected configuration sections, and the problem being solved.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link

codecov bot commented Nov 26, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copy link

@dtoxvanilla1991 dtoxvanilla1991 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line 34 currently pins isort>=5.12.0 unconditionally in requirements.txt, so any workflow that still relies on pip install -r requirements.txt (many CI jobs do) will keep pulling the 5.x series even on Python 3.10+. That contradicts the PR’s stated goal of allowing 3.10+ to use isort 7.

If you really expect everyone—including automation—to switch to pip install -e ".[dev]", then yes, that isort line should be removed so there isn’t a conflicting requirement. But before dropping it, confirm that no CI/CD paths still consume requirements.txt; otherwise you’ll lose isort entirely there. A safer alternative is to keep entries in requirements.txt but mirror the conditional markers already used in pyproject.toml,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants